////////////////////////////////////////////////////////////////////////////////

#ifndef _CLIENT_H_
#define _CLIENT_H_

////////////////////////////////////////////////////////////////////////////////

#ifndef _CLIENTENGINE_H_
#include "clientengine.h"
#endif

#ifndef _CLIENTNETWORK_H_
#include "clientnetwork.h"
#endif

#ifndef _CLIENTGUI_H_
#include "clientgui.h"
#endif

#ifndef _GUI_H_
#include "gui.h"
#endif
class ServerStartPacket;
struct PlayersInfo;


////////////////////////////////////////////////////////////////////////////////


/** This class represents game client
*   It manipulates GUI, engine, network and synchronizes them
*
*  @author   Roman Pasechnik
*  @author   Anastasia Karpinska
*  @since    Jun 23th, 2009
*  @updated  May 20th, 2010
*  @comment  Deprecated info
*/
class Client
{
////////////////////////////////////////////////////////////////////////////////

public:

////////////////////////////////////////////////////////////////////////////////


    /** Constructor */
    Client();


    /** Destructor */
    ~Client();


////////////////////////////////////////////////////////////////////////////////


    /** Starts game */
    void Start();

    void StartEngine();

    void StartNetwork(const std::string& _address, const std::string& _nickName);


////////////////////////////////////////////////////////////////////////////////


    /** Receives packet from server */
    void ReceiveServerState( const ServerStatePacket& _packet );


    /** Receives packet from server */
    void ReceiveServerInfo( const ServerInfoPacket& _packet );


    /** Receives packet from server */
    void ReceiveServerEvent( const ServerEventPacket& _packet );


    /** Receives packet from server */
    void ReceiveServerStatistics( const PlayersInfo& _playersInfo );


    /** Receives packet from server */
    void ReceiveServerStart( const ServerStartPacket& _packet );


    /** Sends packet to server */
    void SendClientInput( const ClientInputPacket& _packet );


    /** Sends packet to server */
    void SendClientInfo( const ClientInfoPacket& _packet );


////////////////////////////////////////////////////////////////////////////////


    /** Set client ID */
    void SetID( int _ID );


////////////////////////////////////////////////////////////////////////////////

private:    

////////////////////////////////////////////////////////////////////////////////


    /** Client engine */
    ClientEngine m_Engine;


    /** Client network */
    ClientNetwork m_Network;


    /** Client GUI */
//    ClientGUI m_GUI;
    GUI m_GUI;


////////////////////////////////////////////////////////////////////////////////
};


////////////////////////////////////////////////////////////////////////////////

#endif

////////////////////////////////////////////////////////////////////////////////

